package com.ai.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ai.common.controller.BaseController;

/**
 * 
 * Class Name : RegisterController<br>
 * 
 * Description : 注册Controller类<br>
 * 
 * @see
 *
 */
@RequestMapping("login")
@Controller("com.ai.controller.RegisterEndController")
public class RegisterEndController extends BaseController {

	
	/**
	 * Description ：注册引导
	 * @throws Exception 
	 */
	@RequestMapping("/registerend")
	public String registerindex() throws Exception {
		
		
		return "/front/frontgoods/registerend";
	}
	
	
	
	/**
	 * Description ：注册提交
	 * @throws Exception 
	 */
	/* @RequestMapping(value ="/registerconfig", method = RequestMethod.POST)
	public @ResponseBody Map<String,Object> registerconfig(Dlxx dlxx) throws Exception {
		
		Map<String,Object> map = new HashMap<String,Object>();
		
		DlxxKey dlxxKey = new DlxxKey();
		dlxxKey.setYhid(dlxx.getYhid());
		Dlxx dlxxByYhid = dlxxService.selectByPrimaryKey(dlxxKey);
		if (dlxxByYhid!=null) {
			map.put("message", "用户名已存在");
			return map;
		}
		
		Dlxx dlxxBySjh = dlxxService.selectByPhone(dlxx);
		if (dlxxBySjh!=null) {
			map.put("message", "手机号已存在");
			return map;
		}
		
		String token = dlxxService.insertSelective(dlxx);
		if (token!=null) {
			map.put("message", 1);
			session.setAttribute("yhid", dlxx.getYhid());
			session.setAttribute("token", token);
		} else {
			map.put("message", -1);
		}
		
		return map;
	}*/
	
	
}
